package com.lld.crowdfunding.service;

import com.lld.crowdfunding.entity.User;
import com.lld.crowdfunding.util.Msg;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;


/**
 * 用户业务逻辑接口
 */
public interface UserService {

    Msg getAll();

    /*获取所有用户*/
    Msg getAllUser(String loginName, Integer role,Integer pn,Integer pageSize);

    /*修改*/
    Msg updateUser(User user,MultipartFile file) throws IOException;

    /*根据id查询用户*/
    Msg getUserById(Long id);

    /*新增注册*/
    Msg saveUser(User user, MultipartFile file) throws IOException;

    /*删除用户*/
    Msg deleteUser(Long id);

    /*逻辑删除*/
    Msg unableUser(Long id,Integer isDeleted);

    /*登录*/
    Msg login(String loginName, String userPwd, HttpSession session, HttpServletRequest request, HttpServletResponse response);

    /*主界面*/
    Msg main(HttpSession session);

}
